<%-- 
    Document   : ingresaDatosHilo
    Created on : 06/12/2008, 10:51:30 AM
    Author     : gabriel
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%
        if (session.getAttribute("user") == null || session.getAttribute("curs_id_") == null) {
                String error;
                if (session.getAttribute("user") == null)
                    error = "usuario nulo";
                else
                    error="Curso nulo";
                session.setAttribute("error", error);
                response.sendRedirect("error.jsp");
                return;
        }
%>



<html>
    <head>
        <jsp:include page="cabecera.jsp"/>

            <!--script type="text/javascript" src="js/AJS.js"></script-->
            <script type="text/javascript" src="js/googiespell.js"></script>
            <!--script type="text/javascript" src="js/cookiesupport.js"></script-->
            <link href="js/googiespell.css" rel="stylesheet" type="text/css" media="all" />

    </head>

<SCRIPT TYPE="text/javascript">
function TestDataCheck()
{
var v_tema = document.formHilo.var_hilo_tema.value;
var v_comentario = document.formHilo.come_texto_.value;
var returnval;
if ( v_user.length > 0 && v_pass.length > 0)
 returnval = true;
else
 {
 alert("Debe completar los campos Tema y descripcion del hilo");
 returnval = false;
 }
return returnval;
}
</SCRIPT>

    <body>
        <div id="main">
            <div id="content">
                <div id="sidebar">
                    <div id="sidebar_top"></div>
                    <div id="sidebar_text">
                        <jsp:include page="sidebarHome.jsp" />
                    </div>
                    <div id="sidebar_bottom"></div>
                </div>
                <div id="text">
                    <br>
                        <br>
                    <h1><strong>Nuevo Hilo</strong></h1> <br>
                     <form action="crearHilo.jsp" name="formHilo" onsubmit="return TestDataCheck()">
                         <table>
                          <tr><td>Tema</td><td><input type="text" name="var_hilo_tema" value="" /> </td></tr>
                          <tr><td>Comentario</td><td><textarea  name="come_texto_" rows="3" cols="60"
                                                                        onkeyup="if( this.value.length >= 100){
                                                                    this.createXMLReq(this.value)
                                                                    alert('Has superado el tamaño máximo permitido: 100'); return false;}"></textarea></td> </tr>
                              </table>
                          <input type="submit" value="Crear nuevo Hilo" />
                    </form>
                </div>
            </div>
            <jsp:include page="footer.jsp"/>
        </div>
    </body>
</html>